#ifndef CTRL_ADD_NEW_ROOT_REQUIREMENT_CTRL_CMD_HPP
#define CTRL_ADD_NEW_ROOT_REQUIREMENT_CTRL_CMD_HPP

#include "Ctrl/ControlCommand.hpp"

namespace Model { class Package; class Requirement; }

namespace Ctrl
{

/// @ingroup Ctrl
/// @brief It implements the command for adding a root requirement to the specified package.
class CTRL_API AddNewRootRequirementCtrlCmd: public ControlCommand
{
public:
	/// @brief it initializes the command.
	/// @param ctrlCenter the control center to be used for signaling model changes.
	/// @param pParentPackage the package to add the root requirement to.
	/// @param pRootRequirement the requirement to be added.
	/// @pre the specified requirement must be a root requirement.
	AddNewRootRequirementCtrlCmd( 
		ControlCenter& ctrlCenter, Model::Package* pParentPackage, Model::Requirement* pRootRequirement);	

	/// @brief It adds the root requirement to the package.
	virtual void execute();

	/// @brief It removes the root requirement from the package.
	virtual void undo();

private:
	Model::Package* pParentPackage_;
	Model::Requirement* pRootRequirement_;
};


} // namespace Ctrl

#endif // CTRL_ADD_NEW_ROOT_REQUIREMENT_CTRL_CMD_HPP
